from .method import methods


# 给模版匹配对应的函数

def pedia_response(pedia_type, words, arcs_dict, postags, hed_index):
    """
    响应hub指派的回答任务，也就是对task类的问题分intent处理
    :param pedia_type: 类型
    :param words:
    :param arcs_dict:
    :param postags:
    :param hed_index:
    :return:
    """
    try:
        answer = methods[pedia_type](words, arcs_dict, postags, hed_index)
    except KeyError:
        raise NotImplementedError('unknown pedia type %s' % pedia_type)
    # if task == 'task_SBV_ADV':  # 未实现
    #     answer = answer_SBV_ADV(words, arcs_dict, postags, hed_index)
    # if task == 'task_SBV_VOB_COO':  # 未实现
    #     answer = answer_SBV_VOB_COO(
    #         words, arcs_dict, postags,hed_index
    #     )
    # if task == 'task_ADV_SBV_HED':
    #     answer = answer_ADV_SBV_HED(
    #         words, arcs_dict, postags, hed_index
    #     )
    # if task == 'task_ADV_HED_DBL_VOB':
    #     answer = answer_ADV_HED_DBL_VOB(
    #         words, arcs_dict, postags, hed_index
    #     )
    # if task == 'task_ADV_SBV_ADV_HED':
    #     answer = answer_ADV_SBV_ADV_HED(
    #         words, arcs_dict, postags, hed_index
    #     )
    # if task == 'task_SBV_ADV_HED':
    #     answer = answer_SBV_ADV_HED(
    #         words, arcs_dict, postags, hed_index
    #     )
    return answer
